package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.sql.Blob;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 个人信息授权表
 *
 * @author chenzh
 * @since 2024-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("person_information_auth")
@Schema(name = "PersonInformationAuth", title = "个人信息授权表", description = "个人信息授权表实体类")
public class PersonInformationAuth extends Model<PersonInformationAuth> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "personInformationAuthId", description = "个人信息授权id")
    @TableId(value = "person_information_auth_id", type = IdType.ASSIGN_ID)
    private Long personInformationAuthId;
    @Schema(name = "personInformationYear", description = "授权年份")
    @TableField(value = "person_information_year")
    private Integer personInformationYear;
    @Schema(name = "personInformationType", description = "授权类型")
    @TableField(value = "person_information_type")
    private String personInformationType;

    @Schema(name = "personInformationName", description = "授权名称")
    @TableField(value = "person_information_name")
    private String personInformationName;

    @Schema(name = "personInformationStatus", description = "授权状态：0 未授权 1 已授权")
    @TableField(value = "person_information_status")
    private String personInformationStatus;

    @Schema(name = "personId", description = "人员id")
    @TableField(value = "person_id")
    private Long personId;

    @Schema(name = "idcard", description = "身份证")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "userId", description = "用户id")
    @TableField(value = "user_id")
    private String userId;

    @Schema(name = "signatureFile", description = "签名文件")
    @TableField(value = "signature_file")
    private String signatureFile;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.personInformationAuthId;
    }
}
